﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Shipwire.Messages
{
    [XmlRootAttribute("OrderList")]
    public class FulfillmentRequest : ShipwireRequest
    {
        public FulfillmentRequest()
        {
        }

        public FulfillmentRequest(Server server, string emailAddress, string password)
            : base(server, emailAddress, password)
        {
        }

        public string Referer { get; set; }
        public string AffiliateId { get; set;  }

        [XmlElement("Order")]
        public FulfillmentOrder[] Orders { get; set; }
    }
    public class FulfillmentOrder
    {
        [XmlAttribute("id")]
        public string Id { get; set; }
        // Shipwire currently does not accept NIL values.
        // If someone requires this feature then they must add it.
        //public bool Hold { get; set; }
        public bool ForceDuplicate { get; set; }
        // Shipwire currently does not accept NIL values.
        // If someone requires this feature then they must add it.
        //public bool CanSplit { get; set; }
        public SameDayRequest SameDay { get; set; }
        public DateTime? DoNotShipBefore { get; set; }
        public string CompanyName { get; set; }
        public Warehouse? Warehouse { get; set; }
        public AddressInfo AddressInfo { get; set; }
        public string Shipping { get; set; }
        public string Email { get; set; }
        public string Carrier { get; set; }
        [XmlElement("Item")]
        public OrderItem[] Items { get; set; }
    }
}
